let userDao = require("../Dao/userDao.js")
let resultUtil = require("../util/ResultUtil.js");

async function userList(filter,page=1,limit=10,sort="_id"){
    let data = await userDao.getUsers(filter,page,limit,sort);
    let count = await userDao.getCount();
    let result = resultUtil(data,count)

    return result;
}

module.exports.userList = userList;